package com.gzhryc.html.dao.db;

import java.util.Date;

import com.gzhryc.html.dao.enums.WebsiteEnum;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;

/**
 * 站点对象
 */
@Table(name = "html_website")
public class Website {

	@Id
	protected Long id;

	@Column
	protected String name;

	@Column(name = "path_prefix", notNull = true)
	protected String pathPrefix; // 访问路径前缀

	@Column
	protected Integer type; // 访问类型

	@Column
	protected String title;

	@Column(length = 255)
	protected String description;

	@Column(length = 255)
	protected String keywords;

	@Column(note = "页面语种")
	protected String lang; // 语种

	@Column(name = "html_theme", note = "页面模板", notNull = true)
	protected String htmlTheme;

	@Column(length = 4)
	protected Integer state;

	@Column(name = "head_html", length = 2028)
	protected String headHtml;

	@Column(name = "foot_html", length = 2028)
	protected String footHtml;

	@Column(name = "update_date", autoUpdateTime = true)
	protected Date updateDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPathPrefix() {
		return pathPrefix;
	}

	public void setPathPrefix(String pathPrefix) {
		this.pathPrefix = pathPrefix;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getHeadHtml() {
		return headHtml;
	}

	public void setHeadHtml(String headHtml) {
		this.headHtml = headHtml;
	}

	public String getFootHtml() {
		return footHtml;
	}

	public void setFootHtml(String footHtml) {
		this.footHtml = footHtml;
	}

	public String getLang() {
		return lang;
	}

	public void setLang(String lang) {
		this.lang = lang;
	}

	public String getHtmlTheme() {
		return htmlTheme;
	}

	public void setHtmlTheme(String htmlTheme) {
		this.htmlTheme = htmlTheme;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getTypeName() {
		return WebsiteEnum.Type.note(this.type);
	}
}
